// *Author：jxx
// *Contact：283591387@qq.com
// *代码由框架生成,任何更改都可能导致被代码生成器覆盖
export default function(){
    const table = {
        key: 'MaterialId',
        footer: "Foots",
        cnName: '物料档案',
        name: 'Material',
        newTabEdit: false,
        url: "/Material/",
        sortName: "CreateDate"
    };
    const tableName = table.name;
    const tableCNName = table.cnName;
    const newTabEdit = false;
    const key = table.key;
    const editFormFields = {"MaterialClassfiyId":[],"Code":"","Name":"","Spec":"","Textures":"","MaterialTypeId":"","MaterialUnitId":"","AssistUnitId":"","UnitConvertTypeId":"","ConversionRate":"","IsLoted":"","IsEnabled":""};
    const editFormOptions = [[{"dataKey":"物料分类级联","data":[],"title":"物料分类","required":true,"field":"MaterialClassfiyId","type":"cascader"},
                               {"title":"编码","required":true,"field":"Code","type":"text"},
                               {"title":"名称","required":true,"field":"Name","type":"text"}],
                              [{"title":"规格型号","field":"Spec","type":"text"},
                               {"title":"材质","field":"Textures","type":"textarea"},
                               {"dataKey":"物料属性","data":[],"title":"属性","field":"MaterialTypeId","type":"select"}],
                              [{"dataKey":"计量单位","data":[],"title":"计量单位","field":"MaterialUnitId","type":"select"},
                               {"dataKey":"计量单位","data":[],"title":"辅计量单位","field":"AssistUnitId","type":"select"},
                               {"dataKey":"单位换算方式","data":[],"title":"单位换算方式","field":"UnitConvertTypeId","type":"select"}],
                              [{"title":"单位换算率","field":"ConversionRate","type":"decimal"},
                               {"dataKey":"是否","data":[],"title":"启用批次","field":"IsLoted","disabled":true,"type":"radio"},
                               {"dataKey":"是否","data":[],"title":"是否启用","required":true,"field":"IsEnabled","type":"radio"}]];
    const searchFormFields = {"Code":"","Name":"","IsEnabled":""};
    const searchFormOptions = [[{"title":"编码","field":"Code"},{"title":"名称","field":"Name"},{"dataKey":"是否","data":[],"title":"是否启用","field":"IsEnabled","type":"radio"}]];
    const columns = [{field:'MaterialId',title:'物料标识',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'MaterialClassfiyId',title:'物料分类',type:'int',bind:{ key:'物料分类级联',data:[]},width:110,require:true,align:'left'},
                       {field:'Code',title:'编码',type:'string',link:true,width:110,require:true,align:'left'},
                       {field:'Name',title:'名称',type:'string',width:110,require:true,align:'left'},
                       {field:'Spec',title:'规格型号',type:'string',width:110,align:'left'},
                       {field:'Textures',title:'材质',type:'string',width:110,align:'left'},
                       {field:'MaterialTypeId',title:'属性',type:'int',bind:{ key:'物料属性',data:[]},width:110,align:'left'},
                       {field:'MaterialUnitId',title:'计量单位',type:'int',bind:{ key:'计量单位',data:[]},width:80,align:'left'},
                       {field:'AssistUnitId',title:'辅计量单位',type:'int',bind:{ key:'计量单位',data:[]},width:80,align:'left'},
                       {field:'UnitConvertTypeId',title:'单位换算方式',type:'int',bind:{ key:'单位换算方式',data:[]},width:80,align:'left'},
                       {field:'ConversionRate',title:'单位换算率',type:'decimal',width:110,align:'left'},
                       {field:'IsLoted',title:'启用批次',type:'int',bind:{ key:'是否',data:[]},width:80,readonly:true,align:'left'},
                       {field:'IsEnabled',title:'是否启用',type:'int',bind:{ key:'是否',data:[]},width:110,require:true,align:'left'},
                       {field:'ExternalDataId',title:'外部数据标识',type:'string',width:110,readonly:true,align:'left'},
                       {field:'CreateID',title:'创建人标识',type:'int',width:80,hidden:true,align:'left'},
                       {field:'Creator',title:'创建人名称',type:'string',width:100,align:'left'},
                       {field:'CreateDate',title:'创建日期',type:'datetime',width:110,align:'left'},
                       {field:'ModifyID',title:'修改人标识',type:'int',width:80,hidden:true,align:'left'},
                       {field:'Modifier',title:'修改人名称',type:'string',width:100,align:'left'},
                       {field:'ModifyDate',title:'修改日期',type:'datetime',width:110,align:'left'},
                       {field:'AuditDate',title:'审核日期',type:'datetime',width:110,align:'left'},
                       {field:'AuditStatus',title:'审核状态',type:'int',bind:{ key:'audit',data:[]},width:110,align:'left'},
                       {field:'AuditId',title:'审核人标识',type:'int',width:110,align:'left'},
                       {field:'Auditor',title:'审核人',type:'string',width:120,align:'left'}];
    const detail ={columns:[]};
    const details = [];

    return {
        table,
        key,
        tableName,
        tableCNName,
        newTabEdit,
        editFormFields,
        editFormOptions,
        searchFormFields,
        searchFormOptions,
        columns,
        detail,
        details
    };
}